package com.glo.quiki.controller;

import com.glo.quiki.model.LoginResult;
import com.glo.quiki.model.QuikiPaymentOrder;
import com.glo.quiki.service.QuikiService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/auth")
@RequiredArgsConstructor
public class AuthController {

    private final QuikiService quikiService;


    @PostMapping("/login")
    public ResponseEntity<LoginResult> login(@RequestParam String email, @RequestParam String password)  {
        return ResponseEntity.ok(quikiService.login(email,password));
    }

}